<template>
    <div class="searchList">
        <van-nav-bar title="搜索页面" left-text="返回" left-arrow @click-left="pathGo" />
        <div class="searchMain">
            <myConTab v-show="!flat" @loading="foo" v-for="item in searchList" :uid="item['id']" :key="item['id']"></myConTab>
        </div>
        <loading v-show="flat"></loading>
    </div>
</template>

<script>
import myConTab from "@/components/myConTab.vue";
import loading from "@/components/loading.vue";
export default {
    name: "searchList",
    components: {
        myConTab,
        loading,
    },
    data() {
        return {
            searchList: [],
            flat: true,
        };
    },
    created() {
        this.searchList = JSON.parse(this.$route.query.searchList);
    },
    methods: {
        pathGo() {
            this.$router.go(-1);
        },
        foo(value) {
            if (this.flat != value["flat"]) {
                this.flat = value["flat"];
            }
        },
    },
};
</script>

<style lang="scss" scope>
@import url(../../static/style/reset.css);
@import "../../static/style/variable.scss";
.searchList {
    font-size: 0.3733rem;
    .van-nav-bar .van-icon,
    .van-nav-bar__text {
        color: #fdcbf1;
    }
    .searchMain {
        margin: 0.2667rem;
        padding-bottom: 1.3333rem;
    }
}
</style>
